#ifndef __HEROZ_INPUT_SUBSYSTEM_HH__
#define __HEROZ_INPUT_SUBSYSTEM_HH__
#include <vector>
#include <SDL/SDL.h>

enum InputStates {
  ISS_fire,
  ISS_right,
  ISS_up,
  ISS_left,
  ISS_down,
  ISS_pause,
  ISS_esc,
  ISS_function,
  ISS_fire2,
  ISS_quit,
  ISS_mousebutton,
  ISS_ENDSTATES
};

class Input {
  std::vector<bool> states;
  int function_key;
  SDLKey last_keysym;
  SDL_MouseButtonEvent mbutton;

public:

  Input();

  bool is_state(InputStates inp) const;
  int get_function_key() const;
  bool is_function() const { return is_state(ISS_function); }
  void poll_events();
  inline SDLKey last_key() const { return last_keysym; }
  const SDL_MouseButtonEvent &mouse() const { return mbutton; }
};

#endif
